<?php
$task_id=$_POST['task_id'];
$task_name=$_POST['task_name'];
$task_content=$_POST['task_content'];
var_dump($task_content);
$dsn = "sqlsrv:Server=localhost;Database=Task";
$db = new PDO($dsn, "sa", "123456");
$sql="update Task 
set TaskName='{$task_name}', TaskContent='{$task_content}',TaskUpdateTime=getdate() where TaskId='{$task_id}';";
$result = $db->exec($sql);
if ($result){
    echo "修改成功,前往<a href='task_list.php'>列表页</a>";
}else{
    echo "修改失败,前往<a href='task_list.php'>列表页</a>";
}